package org.example.service.direct;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

/**
 * @author Tang
 * @classname ErrorService
 * @description [  ]
 * @date 2023/4/10 22:07
 */
@RabbitListener(bindings = {
        @QueueBinding(
                value = @Queue(name = "error-queue"),
                exchange = @Exchange(value = "error-exchange",type = ExchangeTypes.DIRECT)
                ,key = "error-key"
        )
})
//@Component
public class ErrorService {

    @RabbitHandler
    public void errorReceive(String msg) {
        System.out.println("error-Receive: " + msg);
    }


}
